<template>
  <div class="app-container">
    <div class="zd3">
      <div class="zd3-title">
        <h3 @click="searchShow = true">查询</h3>
        <h4 @click="resetList">重置</h4>
      </div>
      <div class="zd3-btm">
        <el-table
          :data="tableData"
          style="width: 100%;border-radius: 8px;"
        >
          <el-table-column type="index" align="center" label="序号" width="80" fixed="left" />
          <el-table-column align="center" prop="proName" label="存货名称" fixed="left"/>
					<el-table-column align="center" label="图片" fixed="left">
						<template slot-scope="scope">
							<img :src="scope.row.proImg" alt="" class="proimg">
							<!-- <img src="@/assets/img/logo.jpg" alt="" class="proimg"> -->
						</template>
					</el-table-column>
					<el-table-column align="center" prop="proCode" label="存货编码" fixed="left"/>
					<el-table-column align="center" prop="proTcode" label="存货条码" />
					<el-table-column align="center" prop="nowSave" label="现存量" />
					<el-table-column align="center" prop="baozhuang" label="包装数" />
					<el-table-column align="center" prop="kucundanwei" label="库存单位现存量" />
					<el-table-column align="center" prop="content" label="备注" />
					<el-table-column align="center" prop="shop" label="厂家" />
					<el-table-column align="center" prop="chandi" label="产地" />
					<el-table-column align="center" prop="color" label="颜色" />
					<el-table-column align="center" prop="size" label="尺寸" />
					<el-table-column align="center" prop="caizhi" label="材质" />
					<el-table-column align="center" prop="kg" label="重量Kg" />
					<el-table-column align="center" prop="classifyName" label="分类全称" />
					<el-table-column align="center" prop="proDisign1" label="存货自定义1" />
					<el-table-column align="center" prop="proDisign2" label="存货自定义2" />
        </el-table>
        <el-pagination
          background
          hide-on-single-page
          layout="prev, pager, next"
          :total="total"
          @prev-click="goPrev"
          @next-click="goNext"
        />
      </div>
    </div>
    <el-dialog :visible.sync="searchShow" :modal-append-to-body="false" :modal="true" width="60">
      <div class="change">
        <p>
          <span>存货状态</span>
          <input type="text" v-model="tempData.workcode" placeholder="请输入职位编码" />
        </p>
        <p>
          <span>机构名称</span>
          <input type="text" v-model="tempData.workname" placeholder="请输入职位名称" />
        </p>
				<p>
				  <span>仓库名称</span>
				  <input type="text" v-model="tempData.workname" placeholder="请输入职位名称" />
				</p>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="searchShow = false">取消</el-button>
        <el-button type="primary" @click="search">查询</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      username: "",
      sureusername: "",
			searchShow: true,
      total: 1,
      tableData: [
        {
          proName: "永生花",
          proImg: require("@/assets/img/logo.jpg"),
					proCode: '112212',
					proTcode: '21321323213',
					nowSave: '100',
					baozhuang: '122',
					kucundanwei: '212',
					content: '',
					shop: '',
					chandi: '河南',
					color: '红色',
					size: '16',
					caizhi: '塑料',
					kg: '12',
					classifyName: '分类名称',
					proDesign1: '存货自定义1',
					proDesign2: '存货自定义2',
          id: 1
        },
        {
          proName: "小米手机",
          proImg: require("@/assets/img/logo.jpg"),
          proCode: '112212',
          proTcode: '21321323213',
          nowSave: '100',
          baozhuang: '122',
          kucundanwei: '212',
          content: '',
          shop: '',
          chandi: '河南',
          color: '红色',
          size: '16',
          caizhi: '塑料',
          kg: '12',
          classifyName: '分类名称',
          proDesign1: '存货自定义1',
          proDesign2: '存货自定义2',
          id: 1
        }
      ],
      dialogVisible: false,
      tempData: "",
      tempIndex: -1,
    };
  },
  methods: {
    changeValue3(value) {},
    write(item, index) {
      console.log(item)
      this.tempData = item
      this.dialogVisible = true;
    },
    search(item) {
			console.log('搜索')
		},
    deleteRow(item) {
      console.log("删除");
    },
    goPrev(page) {
      console.log(page);
    },
    goNext(page) {
      console.log(page);
    },
    resetList() {
      (this.username = ""), (this.sureusername = "");
    },
    addPeople(item) {
      this.dialogVisible = true;
      this.tempIndex = -1;
      this.tempData = {
        workcode: "",
        workname: "",
        id: 1
      };
    }
  }
};
</script>

<style lang="scss" scoped>

/deep/.el-button--primary {
  color: #fff;
  background-color: #18a05e !important;
  border-color: #18a05e !important;
}
/deep/.el-button--primary:hover,
.el-button--primary:focus {
  background: #18a05e !important;
  border-color: #18a05e !important;
  color: #fff !important;
}
/deep/.el-button:hover,
.el-button:focus {
  color: #18a05e;
  background-color: transparent;
}
/deep/.el-button--primary {
  color: #fff;
  background-color: #18a05e;
  border-color: #18a05e;
}
/deep/.el-button--text {
  color: #00c666 !important;
}
.app-container {
  padding: 10px;
}
.proimg{
	width: 30px;
	height: 30px;
}
.inps {
  width: 100%;
  height: 32px;
  line-height: 32px;
  padding-left: 10px;
  background: none;
  border: none;
  color: #333;
}
.inps-active {
  width: 100%;
  height: 32px;
  line-height: 32px;
  padding-left: 10px;
  // background:#ccc;
  border: none;
  color: #333;
}
.zd3-title {
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: relative;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);

  > p {
    font-size: 14px;
    color: #333;
    margin-right: 50px;

    > span {
      padding-right: 20px;
    }

    > input {
      width: 200px;
      height: 32px;
      // background: #ccc;
      border-radius: 3px;
      border: 1px solid #ccc;
      padding-left: 10px;
      color: #333;
    }
  }

  > h3 {
    width: 64px;
    height: 32px;
    background: #18a05e;
    border-radius: 3px;
    margin: 0 40px 0 60px;
    color: #fff;
    font-size: 14px;
    line-height: 32px;
    font-weight: 100;
    text-align: center;
    cursor: pointer;
  }

  > h4 {
    width: 64px;
    height: 32px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 14px;
    line-height: 32px;
    font-weight: 100;
    text-align: center;
    cursor: pointer;
  }
}
.zd3-btm .btn-prev:after {
  content: "上一页";
}
.zd3-btm .btn-next:before {
  content: "下一页";
}
.zd3-btm .btn-prev,
.zd3-btm .btn-next {
  width: 65px;
}
.zd3-btm {
  background: rgba(255, 255, 255, 1);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 10px;
  overflow: hidden;
  &-title {
    display: flex;
    align-items: center;
    height: 70px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    > p {
      text-align: center;
      font-size: 16px;
      color: #333;
    }
  }
  .addDate {
    margin: 20px 32px 10px 32px;
    height: 32px;
    border-radius: 3px;
    text-align: center;
    line-height: 32px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    border: 1px dashed rgba(0, 0, 0, 0.25);
  }
  .el-button--text {
    margin: 0 15px;
  }
}
.change {
  display: flex;
  flex-wrap: wrap;
  > p {
    width: 50%;
    font-size: 14px;
    display: flex;
    align-items: center;
    color: #333;
    /deep/.el-input__inner {
      width: inherit;
      background: none;
      height: 32px;
      // line-height: 32px;
      color: #333;
      border: 1px solid rgba(0, 0, 0, 0.1);
      padding: 0 25px;
    }
    /deep/.el-input__icon {
      line-height: 32px;
    }
    .userselect {
      // max-width: 250px;
      flex: 1;
    }

    > span {
      display: block;
      width: 120px;
      text-align: right;
      padding-right: 15px;
    }
    > input {
      width: inherit;
      flex: 1;
      height: 32px;
      border-radius: 3px;
      border: 1px solid rgba(0, 0, 0, 0.1);
      padding-left: 10px;
      color: #333;
    }
  }
}
</style>
